from django.shortcuts import redirect,reverse

def note_factory_login_superuser_required(func):
    def warpper(request,*args,**kwargs):
        if request.user.is_superuser:
            return func(request,*args,**kwargs)
        return redirect(reverse('cms:login'))
    return warpper